// 商务风格全局样式
.business-style {
  height: 100% !important;
  width: 100% !important;
  box-sizing: border-box;

  // 菜单高度修复
  #GLOBAL_SIDER_MENU_ID {
    height: 100% !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border-right: 1px solid #f0f0f0;
  }

  .menu-wrapper {
    height: 100% !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .ant-menu-inline {
    height: 100% !important;
    min-height: 100%;
    border-right: none !important;
  }

  // 卡片样式优化
  .ant-card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;

    .ant-card-head {
      background: transparent;
      border-bottom: 1px solid #f0f0f0;
      padding: 12px 20px;

      .ant-card-head-title {
        font-weight: 600;
        color: #262626;
      }
    }

    .ant-card-body {
      padding: 16px;
    }
  }

  // 按钮样式优化
  .ant-btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    // border: 1px solid #d9d9d9;

    // text 类型按钮不应该有边框
    &.ant-btn-text {
      border: none;
      box-shadow: none;
    }
  }

  .business-button:hover {
    transform: translateY(-1px);
  }

  .business-button.ant-btn-primary {
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
    border-color: #1890ff;
  }

  .business-button.ant-btn-primary:hover {
    box-shadow: 0 4px 8px rgba(24, 144, 255, 0.3);
    border-color: #40a9ff;
  }

  .business-button.ant-btn-default:hover {
    border-color: #1890ff;
    color: #1890ff;
  }

  .business-button.ant-btn-ghost:hover {
    border-color: #1890ff;
    color: #1890ff;
  }

  .business-button.ant-btn-dashed:hover {
    border-color: #1890ff;
    color: #1890ff;
  }

  .business-button.ant-btn-link:hover {
    color: #40a9ff;
  }

  .business-button.ant-btn-text:hover {
    color: #40a9ff;
    background-color: rgba(24, 144, 255, 0.05);
  }

  /* 不同尺寸的按钮 */
  .business-button.ant-btn-lg {
    height: 44px;
    padding: 8px 16px;
    font-size: 16px;
  }

  .business-button.ant-btn-sm {
    height: 28px;
    padding: 4px 12px;
    font-size: 12px;
  }

  /* 加载状态 */
  .business-button.ant-btn-loading {
    pointer-events: none;
  }

  /* 禁用状态 */
  .business-button.ant-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }

  .business-button.ant-btn-disabled:hover {
    transform: none;
    box-shadow: none;
  }

  // 表格样式优化
  .ant-table {
    border-radius: 8px;
    overflow: hidden;

    .ant-table-thead > tr > th {
      background: #fafafa;
      color: #262626;
      font-weight: 600;
      border-bottom: 1px solid #f0f0f0;
    }

    .ant-table-tbody > tr {
      transition: background-color 0.2s ease;

      &:hover > td {
        background-color: #f5f5f5;
      }
    }

    .ant-table-tbody > tr > td {
      border-bottom: 1px solid #f0f0f0;
    }
  }

  // 输入框样式优化
  .ant-input,
  .ant-input-affix-wrapper {
    border-radius: 6px;
    // border-color: #d9d9d9;
    transition: all 0.2s ease;

    &:hover {
      border-color: #40a9ff;
    }

    &:focus,
    &.ant-input-affix-wrapper-focused {
      border-color: #1890ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }
  }

  // 选择器样式优化
  .ant-select {
    .ant-select-selector {
      border-radius: 6px;
      // border-color: #d9d9d9;
      transition: all 0.2s ease;
    }

    &:hover .ant-select-selector {
      border-color: #40a9ff;
    }

    &.ant-select-focused .ant-select-selector {
      border-color: #1890ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }
  }

  // 标签样式优化
  .ant-tag {
    border-radius: 4px;
    font-weight: 500;

    &.ant-tag-blue {
      background: rgba(24, 144, 255, 0.1);
      border-color: rgba(24, 144, 255, 0.2);
      color: #1890ff;
    }

    &.ant-tag-green {
      background: rgba(82, 196, 26, 0.1);
      border-color: rgba(82, 196, 26, 0.2);
      color: #52c41a;
    }

    &.ant-tag-orange {
      background: rgba(250, 173, 20, 0.1);
      border-color: rgba(250, 173, 20, 0.2);
      color: #faad14;
    }

    &.ant-tag-red {
      background: rgba(255, 77, 79, 0.1);
      border-color: rgba(255, 77, 79, 0.2);
      color: #ff4d4f;
    }
  }

  // 模态框样式优化
  .ant-modal {
    .ant-modal-content {
      border-radius: 8px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    .ant-modal-header {
      border-bottom: 1px solid #f0f0f0;
      padding: 20px 24px;

      .ant-modal-title {
        font-weight: 600;
        color: #262626;
      }
    }

    .ant-modal-body {
      padding: 24px;
    }

    .ant-modal-footer {
      border-top: 1px solid #f0f0f0;
      padding: 16px 24px;
    }
  }

  // 抽屉样式优化
  .ant-drawer {
    .ant-drawer-content {
      border-radius: 8px 0 0 8px;
    }

    .ant-drawer-header {
      border-bottom: 1px solid #f0f0f0;
      padding: 20px 24px;

      .ant-drawer-title {
        font-weight: 600;
        color: #262626;
      }
    }

    .ant-drawer-body {
      padding: 24px;
    }
  }

  // 菜单样式优化
  .ant-menu {
    .ant-menu-item {
      border-radius: 6px;
      margin: 4px 8px;
      transition: all 0.2s ease;

      &:hover {
        background-color: rgba(24, 144, 255, 0.05);
      }

      &.ant-menu-item-selected {
        background-color: rgba(24, 144, 255, 0.1);
        color: #1890ff;
        font-weight: 500;
      }
    }

    .ant-menu-submenu-title {
      border-radius: 6px;
      margin: 4px 8px;
      transition: all 0.2s ease;

      &:hover {
        background-color: rgba(24, 144, 255, 0.05);
      }
    }
  }

  // 分页器样式优化
  .ant-pagination {
    .ant-pagination-item {
      border-radius: 6px;
      border-color: #d9d9d9;

      &:hover {
        border-color: #1890ff;
        color: #1890ff;
      }

      &.ant-pagination-item-active {
        background: #1890ff;
        border-color: #1890ff;

        a {
          color: #fff;
        }
      }
    }

    .ant-pagination-prev,
    .ant-pagination-next {
      border-radius: 6px;
      border-color: #d9d9d9;

      &:hover {
        border-color: #1890ff;
        color: #1890ff;
      }
    }
  }

  // 面包屑样式优化
  .ant-breadcrumb {
    .ant-breadcrumb-link {
      color: #8c8c8c;

      &:hover {
        color: #1890ff;
      }
    }

    .ant-breadcrumb-separator {
      color: #d9d9d9;
    }
  }

  // 统计卡片样式
  .stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);

    .stat-title {
      font-size: 14px;
      opacity: 0.9;
      margin-bottom: 8px;
    }

    .stat-value {
      font-size: 28px;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .stat-desc {
      font-size: 12px;
      opacity: 0.7;
    }
  }

  // 数据卡片变体
  .stat-card-primary {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
  }

  .stat-card-success {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
  }

  .stat-card-warning {
    background: linear-gradient(135deg, #faad14 0%, #d48806 100%);
    box-shadow: 0 4px 12px rgba(250, 173, 20, 0.3);
  }

  .stat-card-error {
    background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%);
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
  }

  // 商务布局间距
  .business-spacing {
    .business-section {
      margin-bottom: 24px;
    }

    .business-card {
      margin-bottom: 16px;
    }

    .business-form-item {
      margin-bottom: 20px;
    }
  }

  // 响应式优化
  @media (max-width: 768px) {
    .ant-card .ant-card-body {
      padding: 16px;
    }

    .ant-modal .ant-modal-body {
      padding: 16px;
    }

    .ant-drawer .ant-drawer-body {
      padding: 16px;
    }
  }
}

// 暗色主题适配
.dark .business-style {
  #GLOBAL_SIDER_MENU_ID {
    border-color: #303030;
    background: #1f1f1f;
  }

  .ant-card {
    border-color: #303030;
    background: #1f1f1f;

    .ant-card-head {
      border-bottom-color: #303030;

      .ant-card-head-title {
        color: #fff;
      }
    }
  }

  .ant-table .ant-table-thead > tr > th {
    background: #262626;
    color: #fff;
    border-bottom-color: #303030;
  }

  .ant-table .ant-table-tbody > tr > td {
    border-bottom-color: #303030;
  }

  .ant-table .ant-table-tbody > tr:hover > td {
    background-color: #262626;
  }

  .business-button {
    border-color: #434343;
  }

  .business-button.ant-btn-default {
    background: #1f1f1f;
    border-color: #434343;
    color: #fff;
  }

  .business-button.ant-btn-default:hover {
    border-color: #1890ff;
    color: #1890ff;
  }

  .business-button.ant-btn-ghost {
    color: #fff;
    border-color: #434343;
  }

  .business-button.ant-btn-ghost:hover {
    border-color: #1890ff;
    color: #1890ff;
  }
}
